package xyz.xtt.user.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
/**
 * <p>
 * 用户资金账户变动记录表
 * </p>
 *
 * @author dale
 * @since 2025-02-25
 */
@Data
@Builder
@Accessors(chain = true)
@TableName("tbl_user_fund_record")
@EqualsAndHashCode(callSuper = false)
@ApiModel(value = "TblUserFundRecord对象", description = "用户资金账户变动记录表")
public class TblUserFundRecord implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("主键")
    private Long id;

    @ApiModelProperty("记录类型：0-支付交易记录、1-提现记录")
    private Integer recordType;

    @ApiModelProperty("支付订单id")
    private Long payOrderId;

    @ApiModelProperty("用户类型 ： 0-买方 1-卖方 2-平台")
    private Integer userType;

    @ApiModelProperty("用户id")
    private Long userId;

    @ApiModelProperty("0：买方支付  1：卖方收入 2：平台收入 3：卖方提现")
    private Integer changeType;

    @ApiModelProperty("资金变动金额")
    private BigDecimal amount;

    @ApiModelProperty("状态：0-已支付 1-待结算 2-已结算 3-已退款 4-提现中 5-已提现")
    private Integer changeStatus;

    @ApiModelProperty("预计结算时间，settle_status=2的数据将于此字段值对应时间进行自动结算")
    private LocalDateTime settlePlanTime;

    @ApiModelProperty("完成结算时间")
    private LocalDateTime settleCompleteTime;

    @ApiModelProperty("提现完成时间")
    private LocalDateTime withdrawCompleteTime;

    @ApiModelProperty("创建时间")
    private LocalDateTime createTime;

    @ApiModelProperty("更新时间")
    private LocalDateTime updateTime;

    @ApiModelProperty("版本号（从0开始，每次更新加1）")
    private Long ver;
}
